<template>
  <div>
    <van-nav-bar :title="detailMessage.name" @click-left="back" left-arrow/>
    <van-row type="flex" justify="space-between">
      <van-col span="8">
        <img :src="detailMessage.cover" alt="cover" class="card-img" style="width: 100%">
      </van-col>
      <van-col span="15">
        <h1 class="van-multi-ellipsis--l2">
          <span>
            <span>{{ detailMessage.name.split(" ")[0] }}</span>
            <span v-html="'&nbsp;&nbsp;'"></span>
            <span class="information">{{ detailMessage.name.split(" ")[1] }}</span>              
          </span>
        </h1>
        <p class="information score">
          <span><van-icon name="edit" color="#8a8a8a" /> {{ detailMessage.tuiScore }} </span>
          <span><van-icon name="good-job-o" color="#8a8a8a"/> {{ detailMessage.desc }}</span>
        </p>
        <p class="information van-ellipsis">
          <span>导演：</span>
          <span>{{ detailMessage.directorName }}</span>
        </p>
        <p class="information van-ellipsis">
          <span>主演：</span>
          <span v-for="(actorName,index) in detailMessage.actorNames.split(',')" :key="index">
            {{ actorName }}
            <span v-html="'&nbsp;&nbsp;'"></span>
          </span>
        </p>
        <p class="information van-ellipsis">
          <span>类型：</span>
          <span>{{ type[detailMessage.type] }}</span>
          <span v-html="'&nbsp;&nbsp;'"></span>
          <span>{{ detailMessage.regions }}</span>
        </p>
      </van-col>
    </van-row>
  </div>
</template>

<script>
export default {
  data () {
    return {
      title: 'sss',
      detailMessage: {
        actorIds: null, actorNames: "郝蕾,金燕玲,曲隽希", addTime: "2020-06-17T13:15:41.000+0000", collectTimes: 5,
        cover: "http://intern-test.oss-cn-hangzhou.aliyuncs.com/image/m/20200617081103.png", desc: null, directorId: 0, 
        directorName: "杨荔钠", doubanScore: 7.2, id: 22, jumpLink: null, linkType: 1, name: "春潮 (2019)",
        regions: "中国大陆 香港 台湾", reviewTimes: 0, showDate: "2020-05-17T05:00:00.000+0000", 
        status: 0, tuiDesc: null, tuiImages: null, tuiScore: 6, tuiVideos: null, type: 1, updateTime: null
      },
      type: {
        11: '喜剧',
        21: '爱情',
        31: '动作',
        41: '恐怖',
        51: '动画',
        1:  '其它',
        0:  '全部'
      }
    }
  },

  methods: {
    back() {
      this.$router.replace('/list')
    }
  }
}
</script>

<style>

</style>